package com.openspring.platform.dao;

import java.util.List;
import com.openspring.framework.dao.GenericDAO;
import com.openspring.platform.model.Dictionary;

public interface DictionaryDAO extends GenericDAO<Dictionary, Long> {
	
	/**
	 * 根据字典类别ID删除字典项
	 * @param dictId
	 * @return
	 */
	int deleteByDictId(Long dictId);
	
	/**
	 * 批量删除, 根据字典类别Id删除字典项
	 * @param dictIds
	 * @return
	 */
	int[] batchDeleteByDictId(Long[] dictIds);
	
	/**
	 * 根据字典类别ID查询字典项
	 * @param dictId
	 * @return
	 */
	List<Dictionary> queryByDictId(Long dictId);
	
	/**
	 * 根据字典类别Code查询字典项
	 * @param dictId
	 * @return
	 */
	List<Dictionary> queryByDictCode(String dictCode);
	
	/**
	 * 根据字典类别Code查询字典项
	 * @param dictId
	 * @return
	 */
	Dictionary getByDictCodeAndValue(String dictCode, String value);
}
